home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 July / EnigmA AMIGA RUN 09 (1996)(G.R. Edizioni)(IT)[!][issue 1996-07 & 08][EARSAN CD VIII].iso / earcd / gui / mgnfclss.rdm < prev    next >
Text File  |  1996-06-17  |  8KB  |  187 lines

  1. Short:    Picture magnifying class for BGUI including source code
  2. Author:   Reinhard Katzmann (suamor@student.uni-tuebingen.de)
  3. Uploader: Reinhard Katzmann (suamor@student.uni-tuebingen.de)
  4. Type:     dev/gui
  5. Replaces: dev/gui/MagnifyClass.lha
  6.  
  7.                   MagnifyClass Version 39.1
  8.                   -------------------------
  9.  
  10. MagnifyClass is (C) 1995/96 by Reinhard Katzmann and FREEWARE. All Rights reserved.
  11.  
  12. Attention: Old archive was corrupt in 1 file (why did no one from Aminet report
  13. that one to me ?? :-( I hope it is not yet on the Aminet CD). Seems I oversaw
  14. it when I tested it before uploading.
  15.  
  16. Introduction
  17. ------------
  18.  
  19. This is the second release of Magnifyclass, a picture sizing (or magnify-
  20. ing) class for BGUI. I've included a test program (testmagnifyclass) for
  21. playing around. For closer information read magnifyclass.doc.
  22.  
  23. If you don't know what the hell BGUI is, read the BGUI.intro text file :-)
  24.  
  25. The usage of the class is similar to paletteclass or popbuttonclass which came
  26. both with BGUI12. The class was written with SAS/C6.56 but should work fine
  27. with other compilers, too. Please tell mel if you have any problems compiling
  28. the class. If you have compiled the class, simply link it with your program
  29. using the class. SAS/C-User may not forget to set the NOSTACKCHECK Option!!
  30. (This should belong to th BGUI-FAQ ;-)
  31.  
  32. Copyright & Disclaimer
  33. ----------------------
  34.  
  35. MagnifyClass is (C) 1995/96 by Reinhard Katzmann. All Rights reserved.
  36. MagnifyClass is FREEWARE, i.e. you must not pay me anything using it with
  37. Public Domain, Freeware, Shareware and Giftware programs. Usage in commercial
  38. programs is NOT allowed without the written permission from me! It may and
  39. should be distributed on the BGUI Home Page and to the BGUI ftp server(s).
  40.  
  41. Ian J. Einman has the exclusive right to add the (hopefully) bug-free version
  42. with the coming BGUI release(s).
  43.  
  44. Changes since last (beta) release
  45. ---------------------------------
  46.  
  47. - Requires V39 of the BGUI library (If you look at the version number you see
  48.   which Version the class actually requires)
  49. - Some minor bug fixes
  50. - Added support for shared lib like done paletteclass V2.1
  51. - Version support, starts with V39.1, identical to bgui.library Version
  52.   i.e. a future V40 Version would require bgui.library V40 (SLib Version only)
  53. - Added more checks for NULL-Pointers in BitMaps
  54. - Added sanity check in MyAllocBitMap/FreeBitMap if GfxBase was opened and if
  55.   there actually was a BitMap as argument, else the shared libb version would
  56.   have crashed badly :-(
  57. - Big Bugs: There were some references to bitmap->Planes which are not allowed
  58. - No longer needs bitmap.library (this lib which was buggy anyway)
  59. - BitMapScale() requires to allocate a temporary bitmap, it does not operate
  60.   directly on the windows bitmap. This may slow the rendering down a bit.
  61. - Finally added a save function to the demo.
  62.  
  63. Usage
  64. -----
  65.  
  66. You need to have installed bgui.library V39 or better. Also the demo program
  67. uses iff.library for loading iff images.
  68.  
  69. There exist two (or three) possibilities to use it. Either you use it as
  70. external gadget class (this is important if you don't program in C/C++
  71. and you can not include SAS/C link libs in your code) or as an SAS/C
  72. (Dice/GCC ?) Link Library. You also can simply compile it and include
  73. the resulting object file. Warning: I did not create an option in the
  74. smakefile for DATA=FAR (i.e. tell the compiler to use 32 bit-references
  75. instead of 16bit). But I don't think it's difficult for you to add it,
  76. in case you need it in your application.
  77.  
  78. I would not use it as external (shared library) gadget class because the
  79. size of gadget class + app is ~10k bigger than using it with link lib. It
  80. would only be useful if many apps are using it or if the language you are
  81. programming is unable to understand SAS/C object code or any other you may
  82. generate (like with the free version of DICE or with gcc).
  83.  
  84. Warning: I did not test it under V37. This mainly concerns the Alloc/Free
  85. functions of the bitmaps.
  86.  
  87. Source Code:
  88. ------------
  89.  
  90. The source code is provided to compile and to link with your program. It may
  91. not be changed or altered in any way! If you have ideas for improving it
  92. somehow please send them to me and I then will consider implementing them
  93. (of course I keep the last word). In no case you may make a new magnifying
  94. class out of this source. But you are allowed to make a new class out of it
  95. that has really other aims than this class. This new class must be distributed
  96. under the same condition as the using (i.e. it may NOT be sold commercial!).
  97. If you decide to do so you must state in your documentation the line:
  98. "This class is based on MagnifyClass (c) 1995/96 Reinhard Katzmann"
  99. (as I have stated in my source code on which it is based).
  100.  
  101. If there are any problems with Dice/GCC compiler building a link library you
  102. should try to solve it (I don't own/use either) and send me diffs so I my be
  103. able to include them in a new release. Please use #ifdef _GCC or similar to
  104. indicate the changes.
  105.  
  106. Resource Tracking: If you turn it on, you will notice that the executables
  107. nearly double in size. I decided to not distribute such a Version.
  108.  
  109. Disclaimer
  110. ----------
  111.  
  112. This program is provided "as is" without warranty of any kind, either
  113. expressed or implied, including, but not limited to, the implied
  114. warranties of merchantability and fitness for a particular purpose.
  115. The entire risk as to the quality and the performance of this collection
  116. is with you. In no event can I be liable to you for damages of any kind
  117. arising out of the use of this program or any part of it's archive, or the
  118. inability to use it.
  119.  
  120. Known Bugs
  121. ----------
  122.  
  123. I have problems with allocating the correct size of the temporary bitmap.
  124. Currently I use ( Magfactor + Grid (if present) ) multiplied by the size of
  125. the part of the image which is to be shown plus (and this is what I find
  126. very strange) the Start point of the image. If I do omit the last I get
  127. Mungwall/Enforcer Hits (i.e. it goes beyond the size of the allocated bitmap).
  128. I can't explain why this happens because the size of the partly shown
  129. image must still be the same.
  130. This is also a prove to me that ScalerDiv() must be wrong, because if it
  131. was true, the above problem may not appear.
  132.  
  133. In the demo: the number showing the magnification is not rendered correctly
  134. on my system. Maybe one of the frame rendering bugs in the current BGUI
  135. V41.3. Hints are welcome :-).
  136.  
  137. The demo does loading/saving of pictures using iff.library which is based on
  138. V37, so uses RGB4 colortables instead of RGB32. This may lead to difficulties.
  139. I'd like to have load/save functions which work on both V37 and V39 (+ GFX
  140. boards as I have a Picasso II, but not dependant on WB-Emu Software if
  141. possible). If you can help me with that or have a function/link lib supporting
  142. loading and saving in an OS-legal way on both V37 and V39 and want to share
  143. it, let me know about it.
  144.  
  145. Future:
  146. -------
  147.  
  148. I will mainly concentrate on removing bugs. The class itself does not need to
  149. be further extended (at least I have no ideas). The demo could support Data-
  150. types for loading/saving images on V39+ systems. Also I would be possible to
  151. add a palette selector gadget so you can draw in different colours. Further
  152. expansions are up to you ;) (You can make a real WB paint program out of it
  153. if you want to - but if you decide to go Shareware I want a free Version!).
  154. Send me all you ideas/bugs (else I have no motivation to continue it).
  155.  
  156. Contacting:
  157. -----------
  158.  
  159. Send bugs, comments, ideas, flames to:
  160.  
  161. E-MAIL (preferred):
  162. -------------------
  163.  
  164.   suamor@student.uni-tuebingen.de
  165.   Reinhard_Udo.Katzmann@student.fh-reutlingen.de
  166.  
  167. SnailMail:
  168. ----------
  169.  
  170.   Reinhard Katzmann
  171.   Schellingstraße 41
  172.  
  173.   D - 72072 Tübingen
  174.  
  175. BBS'es
  176. ------
  177.  
  178. You can try to reach me through BBS'es near Tübingen. Some of the Sysops
  179. might know me or have contact to the Internet. I'm only User of one BBS:
  180.  
  181. Onkel Helmut's Hütte
  182.  
  183. Line 1: (0049) +7157/64546 (28800 Baud)
  184. Line 2: (0049) +7157/65428 (14400 Baud)
  185.  
  186. My usual Nickname on the internet or at this BBS is Suamor.
  187.